//
//  JCCollectionViewItem.swift
//  JCNewsForMac
//
//  Created by ifly on 31/7/18.
//  Copyright © 2018年 Ismail. All rights reserved.
//

import Cocoa

class JCCollectionViewItem: NSCollectionViewItem {
    
    
    var jcTitle = NSTextField()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do view setup here.
        
        
        self.view.addSubview(jcTitle)
        jcTitle.isBordered = false
        jcTitle.isEditable = false
        
        jcTitle.font = NSFont.boldSystemFont(ofSize: 20)
        jcTitle.alignment = .center
        jcTitle.cell?.usesSingleLineMode = true
        
        jcTitle.snp.makeConstraints { (make) in
            make.centerY.equalTo(self.view)
            make.left.right.equalTo(self.view)
            make.height.equalTo(24)
        }
        jcTitle.backgroundColor = NSColor.red
    }
    
}
